package com.tcm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tcm.entity.SocialStudent;
import com.tcm.entity.bo.SocialStudentExcel;
import com.tcm.entity.dto.SocialStudentUpdateDto;
import com.tcm.entity.dto.param.SocialStudentPageParam;
import com.tcm.entity.dto.param.SocialStudentUpdateParam;
import com.tcm.entity.vo.BatchImportResult;
import com.tcm.entity.resp.PageR;
import com.tcm.entity.vo.SocialStudentListResult;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * 社会化学员业务接口
 * @author Guqier
 * @version 1.0
 * @date 2023/7/23 19:44
 */
public interface SocialStudentService extends IService<SocialStudent> {
    @Transactional
    boolean addSocialStudent(SocialStudentUpdateDto dto, Long currUserId);

    @Transactional
    boolean modifySocialStudent(SocialStudentUpdateParam param, Long currUserId);

    @Transactional
    boolean removeSocialStudent(List<Long> ids, Long currUserId);

    PageR<SocialStudentListResult> getSocialStudentListByPage(SocialStudentPageParam param);

    List<SocialStudentListResult> transferSocialStudentToListResult(List<SocialStudent> socialStudents);

    BatchImportResult<SocialStudentExcel> importSocialStudentInfo(MultipartFile file) throws IOException;

    @Transactional
    boolean confirmBatchSocialStudentInfo(String uuid, Long currUserId);

    void exportImportFailedSocialStudentInfo(String uuid, HttpServletResponse response) throws Exception;

    boolean exportSocialStudentInfo(SocialStudentPageParam param, HttpServletResponse response);

    SocialStudent getSocialStudentByAccount(String account);
}
